<?php 
session_start();include "conn.php";
?>
<?php  include("admin.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Bios 管理中心 </title>
<link href="../css/control.css" rel="stylesheet" type="text/css" />
</head>

<body >

 <script language="javascript">
function check_aid(aid){

document.getElementById("a1").style.display = "none";
document.getElementById("a2").style.display = "none";
document.getElementById("a3").style.display = "none";
document.getElementById("a4").style.display = "none";
document.getElementById("a5").style.display = "none";

document.getElementById(aid).style.display = "block";
}
</script>





<a name="top" id="top"></a>
<div id="all"><!--Wrap start //-->
<div id="main" class="clearfix"><!--main start //-->
<div id="top-1"><?php include_once('blog_top_btn.php');?>
</div>
<!--Content for  id "submenu" Goes Here //-->
<div id="submenu">
<?php include_once('blog_main_btn.php');?>
  </div>
 <!--Content for  id "contact" Goes Here //-->
 <div id="contact-add">
 
 
 
 <script language="javascript">
function check(form){
if (document.form1.title.value=="")
{alert("請填寫 標題！");document.form1.title.focus();return false;}
}
</script>




<?php
//文件名。。。

$webname="news"; 
$linkname="blog-main"; 
?>

<?php 









$id=make_safe($_GET["id"]);

//echo $data;
$action=make_safe($_GET["action"]);
$BigClassName=make_safe($_POST["BigClassName"]);
$BigClassName2=make_safe($_POST["BigClassName2"]);
$BigClassName3=make_safe($_POST["BigClassName3"]);
$BigClassName4=make_safe($_POST["BigClassName4"]);
$BigClassName5=make_safe($_POST["BigClassName5"]);
$BigClassName6=make_safe($_POST["BigClassName6"]);
$lb=make_safe($_POST["lb"]);


$mastereditname=$_SESSION["mastereditname2"];
$editname2=$_SESSION["editname2"];

$addname=make_safe($_POST["addname"]);
if($addname==""){
$addname=$_SESSION["username2"];
}

$enBigClassName=make_safe($_POST["enBigClassName"]);
$SmallClassName=make_safe($_POST["SmallClassName"]);
$enSmallClassName=make_safe($_POST["enSmallClassName"]);
$title=make_safe($_POST["title"]);


$c1=make_safe($_POST["c1"]);
if($c1==""){$c1=0;}
$c2=make_safe($_POST["c2"]);
if($c2==""){$c2=0;}
$c3=make_safe($_POST["c3"]);
if($c3==""){$c3=0;}
$c4=make_safe($_POST["c4"]);
if($c4==""){$c4=0;}
$c5=make_safe($_POST["c5"]);
if($c5==""){$c5=0;}
$c6=make_safe($_POST["c6"]);
if($c6==""){$c6=0;}
$c7=make_safe($_POST["c7"]);
if($c7==""){$c7=0;}
$c8=make_safe($_POST["c8"]);
if($c8==""){$c8=0;}
$c9=make_safe($_POST["c9"]);
if($c9==""){$c9=0;}






$tagcloud1=make_safe($_POST["tagcloud1"]);
$tagcloud2=make_safe($_POST["tagcloud2"]);
$tagcloud3=make_safe($_POST["tagcloud3"]);
$tagcloud4=make_safe($_POST["tagcloud4"]);
$tagcloud5=make_safe($_POST["tagcloud5"]);

$entitle=make_safe($_POST["entitle"]);
$isok=1;
$hits=0;
//$addtime=make_safe($_POST["addtime"]);
$addtime=$data2;
$addtime2=$data3;
$senttime=$data2;
$user=make_safe($_POST["user"]);
$content=$_POST["content"];
$encontent=$_POST["encontent"];
$oldimages=make_safe($_POST["oldimages"]);
$oldimages2=make_safe($_POST["oldimages2"]);
$oldimages3=make_safe($_POST["oldimages3"]);
$oldimages4=make_safe($_POST["oldimages4"]);
$oldimages5=make_safe($_POST["oldimages5"]);
$oldimages6=make_safe($_POST["oldimages6"]);
$oldimages7=make_safe($_POST["oldimages7"]);
$oldimages8=make_safe($_POST["oldimages8"]);


include("check.php");




$path = 'upfiles/'. $_FILES['images']['name'];
$type=strstr($path,'.');
$path2 ='upfiles/'.$data."-1".$type;

$path3 = 'upfiles/'. $_FILES['images2']['name'];
$type3=strstr($path3,'.');
$path4 ='upfiles/'.$data."-2".$type3;

$path5 = 'upfiles/'. $_FILES['images3']['name'];
$type5=strstr($path5,'.');
$path6 ='upfiles/'.$data."-3".$type5;

$path7 = 'upfiles/'. $_FILES['images4']['name'];
$type7=strstr($path7,'.');
$path8 ='upfiles/'.$data."-4".$type7;

$path9 = 'upfiles/'. $_FILES['images5']['name'];
$type9=strstr($path9,'.');
$path10 ='upfiles/'.$data."-5".$type9;

$path11 = 'upfiles/'. $_FILES['images6']['name'];
$type11=strstr($path11,'.');
$path12 ='upfiles/'.$data."-6".$type11;

$path13 = 'upfiles/'. $_FILES['images7']['name'];
$type13=strstr($path13,'.');
$path14 ='upfiles/'.$data."-7".$type13;

$path15 = 'upfiles/'. $_FILES['images8']['name'];
$type15=strstr($path15,'.');
$path16 ='upfiles/'.$data."-8".$type15;



$type=strtolower($type); 
$type3=strtolower($type3); 
$type5=strtolower($type5); 
$type7=strtolower($type7); 
$type9=strtolower($type9); 
$type11=strtolower($type11); 
$type13=strtolower($type13);
$type15=strtolower($type15);


 
//增加数据
if($action=="add"){
	
if($type==".jpg" or $type==".jpge"  or $type==".gif" or $type==".doc" or $type==".xls" or $type==".bmp" or $type==".pdf" ){
move_uploaded_file($_FILES['images']['tmp_name'],$path2);

$aa=getimagesize($path2);
$weight=$aa["0"];////获取图片的宽
$height=$aa["1"];///获取图片的高
if($weight>=$height){$weight1=115;$height1=115*$height/$weight;}
if($height>=$weight){$height1=115;$weight1=115*$weight/$height;}

$t = new ThumbHandler();
$t->setSrcImg($path2);
    $t->setCutType(1);//这一句就OK了
    $t->setDstImg("pic/".$path2);
    $t->createImg(115,115);

$aa=getimagesize($path2);
$weight=$aa["0"];////获取图片的宽
$height=$aa["1"];///获取图片的高
//if($weight>=$height){$weight1=600;$height1=600*$height/$weight;}
//if($height>=$weight){$height1=400;$weight1=400*$weight/$height;}
$height1=400;$weight1=400*$weight/$height;

if($lb==2){
$resizeimage = new resizeimage($path2, "368", "552", "0","big/".$path2);
}
else
{
$resizeimage = new resizeimage($path2, $weight1, $height1, "0","big/".$path2);
}

if($path2 !='upfiles/'.$data."-1"){unlink($path2);}
}//上传图片
else
{
$path2="";
}


if($type3==".jpg"  or $type3==".jpge" or $type3==".gif" or $type3==".doc" or $type3==".xls" or $type3==".bmp" or $type3==".pdf" ){
move_uploaded_file($_FILES['images2']['tmp_name'],$path4);

$aa=getimagesize($path4);
$weight=$aa["0"];////获取图片的宽
$height=$aa["1"];///获取图片的高
if($weight>=$height){$weight1=115;$height1=115*$height/$weight;}
if($height>=$weight){$height1=115;$weight1=115*$weight/$height;}

$t = new ThumbHandler();
$t->setSrcImg($path4);
    $t->setCutType(1);//这一句就OK了
    $t->setDstImg("pic/".$path4);
    $t->createImg(115,115);

$aa=getimagesize($path4);
$weight=$aa["0"];////获取图片的宽
$height=$aa["1"];///获取图片的高
//if($weight>=$height){$weight1=600;$height1=600*$height/$weight;}
//if($height>=$weight){$height1=400;$weight1=400*$weight/$height;}
$height1=400;$weight1=400*$weight/$height;
if($lb==2){
$resizeimage = new resizeimage($path4, "368", "552", "0","big/".$path4);
}
else
{
$resizeimage = new resizeimage($path4, $weight1, $height1, "0","big/".$path4);
}
if($path4 !='upfiles/'.$data."-2"){unlink($path4);}

}//上传图片
else
{
$path4="";
}

if($type5==".jpg"  or $type5==".jpge" or $type5==".gif" or $type5==".doc" or $type5==".xls" or $type5==".bmp" or $type5==".pdf" ){
move_uploaded_file($_FILES['images3']['tmp_name'],$path6);

$aa=getimagesize($path6);
$weight=$aa["0"];////获取图片的宽
$height=$aa["1"];///获取图片的高
if($weight>=$height){$weight1=115;$height1=115*$height/$weight;}
if($height>=$weight){$height1=115;$weight1=115*$weight/$height;}

$t = new ThumbHandler();
$t->setSrcImg($path6);
    $t->setCutType(1);//这一句就OK了
    $t->setDstImg("pic/".$path6);
    $t->createImg(115,115);

$aa=getimagesize($path6);
$weight=$aa["0"];////获取图片的宽
$height=$aa["1"];///获取图片的高
//if($weight>=$height){$weight1=600;$height1=600*$height/$weight;}
//if($height>=$weight){$height1=400;$weight1=400*$weight/$height;}
$height1=400;$weight1=400*$weight/$height;
if($lb==2){
$resizeimage = new resizeimage($path6, "368", "552", "0","big/".$path6);
}
else
{
$resizeimage = new resizeimage($path6, $weight1, $height1, "0","big/".$path6);
}
if($path6 !='upfiles/'.$data."-3"){unlink($path6);}
}//上传图片
else
{
$path6="";
}


if($type7==".jpg"  or $type7==".jpge" or $type7==".gif" or $type7==".doc" or $type7==".xls" or $type7==".bmp" or $type7==".pdf" ){
move_uploaded_file($_FILES['images4']['tmp_name'],$path8);

$aa=getimagesize($path8);
$weight=$aa["0"];////获取图片的宽
$height=$aa["1"];///获取图片的高
if($weight>=$height){$weight1=115;$height1=115*$height/$weight;}
if($height>=$weight){$height1=115;$weight1=115*$weight/$height;}

$t = new ThumbHandler();
$t->setSrcImg($path8);
    $t->setCutType(1);//这一句就OK了
    $t->setDstImg("pic/".$path8);
    $t->createImg(115,115);


$aa=getimagesize($path8);
$weight=$aa["0"];////获取图片的宽
$height=$aa["1"];///获取图片的高
//if($weight>=$height){$weight1=600;$height1=600*$height/$weight;}
//if($height>=$weight){$height1=400;$weight1=400*$weight/$height;}
$height1=400;$weight1=400*$weight/$height;
if($lb==2){
$resizeimage = new resizeimage($path8, "368", "552", "0","big/".$path8);
}
else
{
$resizeimage = new resizeimage($path8, $weight1, $height1, "0","big/".$path8);
}
if($path8 !='upfiles/'.$data."-4"){unlink($path8);}

}//上传图片
else
{
$path8="";
}


if($type9==".jpg"  or $type9==".jpge" or $type9==".gif" or $type9==".doc" or $type9==".xls" or $type9==".bmp" or $type9==".pdf" ){
move_uploaded_file($_FILES['images5']['tmp_name'],$path10);

$aa=getimagesize($path10);
$weight=$aa["0"];////获取图片的宽
$height=$aa["1"];///获取图片的高
if($weight>=$height){$weight1=115;$height1=115*$height/$weight;}
if($height>=$weight){$height1=115;$weight1=115*$weight/$height;}

$t = new ThumbHandler();
$t->setSrcImg($path10);
    $t->setCutType(1);//这一句就OK了
    $t->setDstImg("pic/".$path10);
    $t->createImg(115,115);

$aa=getimagesize($path10);
$weight=$aa["0"];////获取图片的宽
$height=$aa["1"];///获取图片的高
//if($weight>=$height){$weight1=600;$height1=600*$height/$weight;}
//if($height>=$weight){$height1=400;$weight1=400*$weight/$height;}
$height1=400;$weight1=400*$weight/$height;
if($lb==2){
$resizeimage = new resizeimage($path10, "368", "552", "0","big/".$path10);
}
else
{
$resizeimage = new resizeimage($path10, $weight1, $height1, "0","big/".$path10);
}
if($path10 !='upfiles/'.$data."-5"){unlink($path10);}


}//上传图片
else
{
$path10="";
}

if($type11==".jpg"  or $type11==".jpge" or $type11==".gif" or $type11==".doc" or $type11==".xls" or $type11==".bmp" or $type11==".pdf" ){
move_uploaded_file($_FILES['images6']['tmp_name'],$path12);

$aa=getimagesize($path12);
$weight=$aa["0"];////获取图片的宽
$height=$aa["1"];///获取图片的高
if($weight>=$height){$weight1=115;$height1=115*$height/$weight;}
if($height>=$weight){$height1=115;$weight1=115*$weight/$height;}

$t = new ThumbHandler();
$t->setSrcImg($path12);
    $t->setCutType(1);//这一句就OK了
    $t->setDstImg("pic/".$path12);
    $t->createImg(115,115);

$aa=getimagesize($path12);
$weight=$aa["0"];////获取图片的宽
$height=$aa["1"];///获取图片的高
//if($weight>=$height){$weight1=600;$height1=600*$height/$weight;}
//if($height>=$weight){$height1=400;$weight1=400*$weight/$height;}
$height1=400;$weight1=400*$weight/$height;
if($lb==2){
$resizeimage = new resizeimage($path12, "368", "552", "0","big/".$path12);
}
else
{
$resizeimage = new resizeimage($path12, $weight1, $height1, "0","big/".$path12);
}
if($path12 !='upfiles/'.$data."-6"){unlink($path12);}


}//上传图片
else
{
$path12="";
}

if($type13==".jpg"  or $type13==".jpge" or $type13==".gif" or $type13==".doc" or $type13==".xls" or $type13==".bmp" or $type13==".pdf" ){
move_uploaded_file($_FILES['images7']['tmp_name'],$path14);
$resizeimage = new resizeimage($path14, "200", "100", "0","pic/".$path14);
}//上传图片
else
{
$path14="";
}


if($type15==".jpg"  or $type15==".jpge" or $type15==".gif" or $type15==".doc" or $type15==".xls" or $type15==".bmp" or $type15==".pdf" ){
move_uploaded_file($_FILES['images8']['tmp_name'],$path16);
if($lb==2){
$resizeimage = new resizeimage($path16, "368", "552", "0","big/".$path16);
}
else
{
$resizeimage = new resizeimage($path16, $weight1, $height1, "0","big/".$path16);
}
}//上传图片
else
{
$path16="";
}

$sql="Insert Into ".$webname." (c1,c2,c3,c4,c5,c6,c7,c8,c9,title,tagcloud1,tagcloud2,tagcloud3,tagcloud4,tagcloud5,entitle,content,BigClassName,BigClassName2,lb,mastereditname,editname2,addname,isok,hits,addtime,addtime2,images,images2,images3,images4,images5,images6,images7,images8) Values('$c1','$c2','$c3','$c4','$c5','$c6','$c7','$c8','$c9','$title','$tagcloud1','$tagcloud2','$tagcloud3','$tagcloud4','$tagcloud5','$entitle','$content','$BigClassName','$BigClassName2','$lb','$mastereditname','$editname2','$addname','$isok','$hits','$addtime','$addtime2','$path2','$path4','$path6','$path8','$path10','$path12','$path14','$path16')";
$result=mysql_query($sql);




if($tagcloud1!=""){
$sql=mysql_query("select * from tagcloud where title = '$tagcloud1'");
$result=mysql_fetch_array($sql);
if ($result!=false){	
}
else
{
$sql="Insert Into tagcloud (title) Values('$tagcloud1')";
$result=mysql_query($sql);
}
}

if($tagcloud2!=""){
$sql=mysql_query("select * from tagcloud where title = '$tagcloud2'");
$result=mysql_fetch_array($sql);
if ($result!=false){	
}
else
{
$sql="Insert Into tagcloud (title) Values('$tagcloud2')";
$result=mysql_query($sql);
}
}


if($tagcloud3!=""){
$sql=mysql_query("select * from tagcloud where title = '$tagcloud3'");
$result=mysql_fetch_array($sql);
if ($result!=false){	
}
else
{
$sql="Insert Into tagcloud (title) Values('$tagcloud3')";
$result=mysql_query($sql);
}
}


if($tagcloud4!=""){
$sql=mysql_query("select * from tagcloud where title = '$tagcloud4'");
$result=mysql_fetch_array($sql);
if ($result!=false){	
}
else
{
$sql="Insert Into tagcloud (title) Values('$tagcloud4')";
$result=mysql_query($sql);
}
}


if($tagcloud5!=""){
$sql=mysql_query("select * from tagcloud where title = '$tagcloud5'");
$result=mysql_fetch_array($sql);
if ($result!=false){	
}
else
{
$sql="Insert Into tagcloud (title) Values('$tagcloud5')";
$result=mysql_query($sql);
}
}


echo "<script> alert('增加成功！');window.location.href='".$linkname.".php';</script>";
}




?>




<script language="javascript"> 



function Checker(){ 


  
// document.write(document.form1.id.length)
  
  
  
   //if(document.form1.yaoyun.value==""){document.write("您按了确认！") }
   
   //  document.write("您按了确认！") 

   

document.form1.items.value = "";         //设置隐藏域的值为空
if ( !document.form1.tagcloud.length ) {      //只有一个复选框，form1.item.length = undefined



	if ( document.form1.tagcloud.checked ){
	document.form1.items.value = document.form1.tagcloud.value; 
	
	
	} 
}else { 

	var temp="";
	for ( i = 0 ; i < document.form1.tagcloud.length ; i++ ){ 
		if ( document.form1.tagcloud[i].checked ){       //复选框中有选中的框 
			temp=temp+document.form1.tagcloud[i].value+",";   //将数组中的元素使用","分隔
		}	 

	} 
	temp=temp.substring(0,temp.length-1);     //去除字符串末尾多余的","
	document.form1.items.value = temp;    //将变量赋值给隐藏域
	
//	document.write(document.form1.items.value)
} 
} 
</script>  

<script language="javascript">
function CheckAll(elementsA,elementsB)
{
	var len = elementsA;
	if(len.length > 0)
	{
		for(i=0;i<len.length;i++)
		{
			elementsA[i].checked = true;
		}
		if(elementsB.checked ==false)
		{
			for(j=0;j<len.length;j++)
			{
				elementsA[j].checked = false;
			}
		}
	}
	else
	{
		len.checked = true;
		if(elementsB.checked == false)
		{
			len.checked = false;
		}
	}
}
</script>


 
<form onSubmit="Checker()" method="post" enctype="multipart/form-data" name="form1"  action="?action=add" target="_self">
 <table border="0" cellpadding="0" cellspacing="0" >
     <tr>
       <td>文章標題：
         
         <input name="title" type="text" class="contact_add-tit-keyin"  /></td>
     </tr>
     <tr>
       <td>  <ul>
    <li>選擇分類：</li>
	
	<?php if($_SESSION["box11"]==1 or $_SESSION["box22"]==1 or $_SESSION["box33"]==1 or $_SESSION["a11"]==1){?>
    <li>
      <input type="radio" name="BigClassName" value="Flavor"  onclick="check_aid('a1')" />
      Flavor  </li>
	  <?php }?>
	  
	  <?php if($_SESSION["box11"]==1 or $_SESSION["box22"]==1 or $_SESSION["box33"]==1 or $_SESSION["a22"]==1){?>
    <li><input type="radio" name="BigClassName" value="Trend" onclick="check_aid('a2')" />
      Trend </li>
	  <?php }?>
	  
     <?php if($_SESSION["box11"]==1 or $_SESSION["box22"]==1 or $_SESSION["box33"]==1 or $_SESSION["a33"]==1){?><li><input type="radio" name="BigClassName" value="City" onclick="check_aid('a3')" />
     City </li>
	 <?php }?>
	  <?php if($_SESSION["box11"]==1 or $_SESSION["box22"]==1 or $_SESSION["box33"]==1 or $_SESSION["a44"]==1){?>
    <li><input type="radio" name="BigClassName" value="Traveling" onclick="check_aid('a4')" />
      Traveling </li>
	  <?php }?>
	  
	   <?php if($_SESSION["box11"]==1 or $_SESSION["box22"]==1 or $_SESSION["box33"]==1 or $_SESSION["a55"]==1){?>
    <li><input type="radio" name="BigClassName" value="Opinion" onclick="check_aid('a5')" />
      Opinion</li>
	  <?php }?>
	  
	   <?php if($_SESSION["box11"]==1 or $_SESSION["box22"]==1 or $_SESSION["box33"]==1 or $_SESSION["a66"]==1){?>
	  <li><input type="radio" name="BigClassName" value="collection" onclick="check_aid('a6')" />
      collection</li>
	  <?php }?>
	  
	   <?php if($_SESSION["box11"]==1 or $_SESSION["box22"]==1 or $_SESSION["box33"]==1 or $_SESSION["a77"]==1){?>
	   <li>
           <input type="radio" name="BigClassName" value="DOWNLOAD" onclick="check_aid('a7')"  />       
           DOWNLOAD</li>
	  
	  <?php }?>
  </ul></td>
     </tr>
	 
	 
	 
	 
	 <tr>
       <td><ul>
         <li>第二分類：</li>
		 <li>
           <input name="BigClassName2" type="radio" value="0" checked="checked" />           
           無</li>
		 
         <li>
           <input name="BigClassName2" type="radio" value="1"  />           
           NEWS</li>
		   
         <li>
           <input type="radio" name="BigClassName2" value="2"  />          
           FEATURES</li>
		   
         <li>
           <input type="radio" name="BigClassName2" value="3"  />         
           COLUMNS</li>
		   
		 <li>
           <input type="radio" name="BigClassName2" value="4"  />     
           EVENTS</li>
		   
		 
		
       </ul></td>
     </tr>
	 
	 
	 
	 
	 
	 
	 
     <tr>
       <td>  <ul>
    <li>文章格式：</li>
    <li>
      <input type="radio" name="lb" value="1" />
      橫圖較多格式</li>
    <li>
      <input type="radio" name="lb" value="2" />
      直圖格式</li>
  </ul></td>
     </tr>
	 
	 
	 <?php if($_SESSION["box11"]==1 or $_SESSION["box22"]==1 or $_SESSION["box33"]==1 ){?>
	 <tr>
       <td>
       <ul>
    <li>文章作者：</li>
    <li>
           <input name="addname" type="radio" value="" checked="checked" />           
           無</li>
		 </ul>   
	
	
	 <ul id="a1" style="display:none">
	<?php 
$n=1;
$sql="select  id,box4,username,name,a1 from guanli where box4='1' and a1='1'   order by id desc ";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>	   
    <li>
      <input type="radio" name="addname" value="<?php echo $row->username;?>"  />     
      <?php echo $row->name;?></li>
    <?php }?>
	 </ul>
	
	
	 <ul id="a2" style="display:none">
		<?php 
$n=1;
$sql="select  id,box4,username,name,a2 from guanli where box4='1' and a2='1'   order by id desc ";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>	   
    <li>
      <input type="radio" name="addname" value="<?php echo $row->username;?>"  />     
      <?php echo $row->name;?></li>
    <?php }?>
	 </ul>
	
	
	
	
	
	
	 <ul id="a3" style="display:none">
		<?php 
$n=1;
$sql="select  id,box4,username,name,a3 from guanli where box4='1' and a3='1'   order by id desc ";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>	   
    <li>
      <input type="radio" name="addname" value="<?php echo $row->username;?>"  />     
      <?php echo $row->name;?></li>
    <?php }?>
	 </ul>
	
	
	
	 <ul id="a4" style="display:none">
		<?php 
$n=1;
$sql="select  id,box4,username,name,a4 from guanli where box4='1' and a4='1'   order by id desc ";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>	   
    <li>
      <input type="radio" name="addname" value="<?php echo $row->username;?>"  />     
      <?php echo $row->name;?></li>
    <?php }?>
	 </ul>
	
	
	 <ul id="a5" style="display:none">
		<?php 
$n=1;
$sql="select  id,box4,username,name,a5 from guanli where box4='1' and a5='1'   order by id desc ";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>	   
    <li>
      <input type="radio" name="addname" value="<?php echo $row->username;?>"  />     
      <?php echo $row->name;?></li>
    <?php }?>
	 </ul>
	
	
	 <ul id="a6" style="display:none">
		<?php 
$n=1;
$sql="select  id,box4,username,name,a6 from guanli where box4='1' and a6='1'   order by id desc ";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>	   
    <li>
      <input type="radio" name="addname" value="<?php echo $row->username;?>"  />     
      <?php echo $row->name;?></li>
    <?php }?>
	 </ul>
	
	
	 <ul id="a7" style="display:none">
		<?php 
$n=1;
$sql="select  id,box4,username,name,a7 from guanli where box4='1' and a7='1'   order by id desc ";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>	   
    <li>
      <input type="radio" name="addname" value="<?php echo $row->username;?>"  />     
      <?php echo $row->name;?></li>
    <?php }?>
	
	
	
  </ul>
       </td>
     </tr>
	 <?php }?>
	 
	 

	 
	 
	 
	 
   </table>
 <table border="0" cellpadding="0" cellspacing="0" >
   <tr>
     <td>新增圖片：
     </td>
   </tr>
   <tr>
     <td  class="contact_add-upload">圖片1：
       <input name="images" type="file" size="50"  /></td>
   </tr>
   <tr>
     <td class="contact_add-upload">圖片2：
       <input name="images2" type="file" size="50"  /></td>
   </tr>
   <tr>
     <td class="contact_add-upload">圖片3：
       <input name="images3" type="file" id="images3" size="50" /></td>
   </tr>
   <tr>
     <td class="contact_add-upload">圖片4：
       <input name="images4" type="file" id="images4" size="50" /></td>
   </tr>
   <tr>
     <td class="contact_add-upload">圖片5：
       <input name="images5" type="file" id="images5" size="50" /></td>
   </tr>
   <tr>
     <td class="contact_add-upload">圖片6：
       <input name="images6" type="file" id="images6" size="50" /></td>
   </tr>
 </table>
 <table border="0" cellpadding="0" cellspacing="0" >
   <tr>
     <td>編輯內容： </td>
   </tr>
   <tr>
     <td><?php 
include('../fckeditor/fckeditor.php');
	$oFCKeditor = new FCKeditor('FCKeditor1')  ; 
	$oFCKeditor->BasePath = '../fckeditor/' ;    
	$oFCKeditor->ToolbarSet = 'Default' ; 
	$oFCKeditor->InstanceName = 'content' ; 
	$oFCKeditor->Width = '100%' ; 
	$oFCKeditor->Height = '400' ; 
	//$oFCKeditor->Value  = $row['content']; 
	//$oFCKeditor->Value  = $row->content; 
$oFCKeditor->Create();?></td>
   </tr>
   
 </table>
 
  <table border="0" cellpadding="0" cellspacing="0" >
   <tr>
     <td>標簽雲（關鍵字）設定： </td>
   </tr>
   <tr>
     <td><ul>
       <li>
         <label for="textfield3"></label>
         <input name="tagcloud1" type="text" class="contact_tagcloud" id="textfield3" />
       </li>
       <li>
         <label for="textfield3"></label>
         <input name="tagcloud2" type="text" class="contact_tagcloud" id="textfield3" />
       </li>
       <li>
         <label for="textfield3"></label>
         <input name="tagcloud3" type="text" class="contact_tagcloud" id="textfield3" />
       </li>
       <li>
         <label for="textfield3"></label>
         <input name="tagcloud4" type="text" class="contact_tagcloud" id="textfield3" />
       </li>
       <li>
         <label for="textfield3"></label>
         <input name="tagcloud5" type="text" class="contact_tagcloud" id="textfield3" />
       </li>
     </ul></td>
   </tr>
 </table>

 <table border="0" cellspacing="0" cellpadding="0" >
  <tr>
    <td><input onClick="return check(form);" type="submit" name="Submit" value="提交保存" class="input"></td>
  </tr>
</table>
</form>




</div>
 </div><!-- main end //-->
</div><!--Wrap end //-->

<div id="botton">
 <?php include_once('blog_botton_btn.php');?>
</div>
</body>
</html>
